﻿@using EpiInfoCloudMagpiBridge.Models
@model IEnumerable<EpiInfoCloudMagpiBridge.AzureMobileServiceSetting>

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}



<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>

    <h3>Manage Azure Credentials </h3>
    <hr />
    
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.EWAVUserID)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.MobileServiceName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ApplicationKey)
            </th>
            <th></th>
        </tr>
    
    @foreach (var item in Model) 
    {
        if (item.EWAVUserID == ApplicationModel.CurrentEwavUserId)
            {

        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.EWAVUserID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MobileServiceName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ApplicationKey)
            </td>
            <td class="editOptions">
                @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
                @*@Html.ActionLink("Details", "Details", new { id = item.Id }) |*@
                @Html.ActionLink("Delete", "Delete", new { id = item.Id })
            </td>
        </tr>
        }
    }
    
    </table>

    <p>
        @Html.ActionLink("Create New Record", "Create")
    </p>
</body>
</html>
